<template>
  <div class="mainContent">
    <el-container>
      <el-aside width="200px">
        <!-- <el-radio-group v-model="isCollapse" size="small" style="margin-bottom: 20px;">
          <el-radio-button :label="false">展开</el-radio-button>
          <el-radio-button :label="true">收起</el-radio-button>
        </el-radio-group> -->
        <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse">
          

          <router-link to="/ruanjian">
            <el-menu-item index="1" >
              <span slot="title">软件资产管理</span>
            </el-menu-item>
          </router-link>


          <!-- <router-link to="/jiankong">
            <el-menu-item index="2">
              <span slot="title">平台自身监控</span>
            </el-menu-item>
          </router-link> -->

          <router-link to="/services">
            <el-menu-item index="3">
              <span slot="title">自服务管理</span>
            </el-menu-item>
          </router-link>

          <router-link to="/cabinet">
            <el-menu-item index="4">
              <span slot="title">机房机柜监控图</span>
            </el-menu-item>
          </router-link>

          <router-link to="/celue">
            <el-menu-item index="5">
              <span slot="title">策略管理</span>
            </el-menu-item>
          </router-link>


          
        </el-menu>
      </el-aside>
      <el-container>
        <!-- <el-header class="header">Header</el-header> -->
        <el-main>
          <!-- 组件切换时添加过渡效果 -->
          <transition name="slide-left" mode="out-in" :duration="100">
            <router-view style="padding: 10px;"></router-view>
          </transition>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'mainContent',
  data () {
    return {
      isCollapse: false
    }
  },
  methods: {
    handleOpen (key, keyPath) {
      // console.log(key, keyPath);
    },
    handleClose (key, keyPath) {
      // console.log(key, keyPath);
    }
  }
}
</script>
<style>
  /* 菜单收起动画 */
  .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
  }
  .header{
    height: 50px !important;
    line-height: 50px;
    background: #ccc;
  }
</style>

<style scoped lang='less'>
  .mainContent{
    width: 100%;
    height: 100%;
    .el-container{
      height: 100%;
      .el-main{
        height: 100%;
        padding: 0px;
      }
      .el-aside{
        background: #fff;
      }
    }
  }
</style>
